from typing import List

class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]:
        lookup = {}
        for index, value in enumerate(nums):
            complement = target - value
            if complement in lookup:
                return [lookup[complement], index]
            lookup[value] = index
        return []

if __name__ == "__main__":
    solution = Solution()
    nums = [2, 7, 11, 15]
    target = 9
    result = solution.twoSum(nums, target)
    print(result)